package com.zb.util;

import java.util.ArrayList;
import java.util.List;

public class PageUtil10 {
	
	private int index = 1;
	
	private int size = 10;
	
	private int total;
	
	private int count;
	
	private List data = new ArrayList();
	
	private boolean pre;
	
	private boolean next;

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public int getTotal() {
		total = count % size == 0 ? count / size : count / size + 1;
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public List getData() {
		return data;
	}

	public void setData(List data) {
		this.data = data;
	}

	public boolean isPre() {
		pre = index > 1 ? true : false;
		return pre;
	}

	public void setPre(boolean pre) {
		this.pre = pre;
	}

	public boolean isNext() {
		next = index < this.getTotal() ? true : false;
		return next;
	}

	public void setNext(boolean next) {
		this.next = next;
	}

}
